<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Alexa Auto SDK: AddressBook.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="aace-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Alexa Auto SDK
   &#160;<span id="projectnumber">2.2.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_e05d7e2b1ecd646af5bb94391405f3b5.html">modules</a></li><li class="navelem"><a class="el" href="dir_5cd2d778ee4a67e679c908a7fb6b2561.html">address-book</a></li><li class="navelem"><a class="el" href="dir_944728a8e874c6ac2ec3f72ef579be84.html">platform</a></li><li class="navelem"><a class="el" href="dir_56c123417df9838e2d3c29789f2290e9.html">include</a></li><li class="navelem"><a class="el" href="dir_8d087bd24df25a0b0cd74236be1cb101.html">AACE</a></li><li class="navelem"><a class="el" href="dir_ca3d5615e9a1b0c3646c1bf8a03784c3.html">AddressBook</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">AddressBook.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright 2019-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;).</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * You may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * A copy of the License is located at</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *     http://aws.amazon.com/apache2.0/</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * or in the &quot;license&quot; file accompanying this file. This file is distributed</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * express or implied. See the License for the specific language governing</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * permissions and limitations under the License.</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160; </div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#ifndef AACE_ADDRESS_BOOK_ADDRESS_BOOK_H</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#define AACE_ADDRESS_BOOK_ADDRESS_BOOK_H</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &quot;AACE/Core/PlatformInterface.h&quot;</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceaace.html">aace</a> {</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="keyword">namespace </span>addressBook {</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="keyword">class </span>AddressBookEngineInterface;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="keyword">class </span>AddressBook : <span class="keyword">public</span> <a class="code" href="classaace_1_1core_1_1_platform_interface.html">aace::core::PlatformInterface</a> {</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <span class="keyword">virtual</span> ~AddressBook();</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keyword">enum class</span> AddressBookType {</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="comment">// Contacts</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        CONTACT,</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        <span class="comment">// Navigation Address</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        NAVIGATION</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    };</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classaace_1_1address_book_1_1_address_book_1_1_i_address_book_entries_factory.html">   47</a></span>&#160;    <span class="keyword">class </span><a class="code" href="classaace_1_1address_book_1_1_address_book_1_1_i_address_book_entries_factory.html">IAddressBookEntriesFactory</a> {</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        <span class="keyword">virtual</span> ~<a class="code" href="classaace_1_1address_book_1_1_address_book_1_1_i_address_book_entries_factory.html">IAddressBookEntriesFactory</a>() = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> addName( <span class="keyword">const</span> std::string&amp; entryId, <span class="keyword">const</span> std::string&amp; name ) = 0;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> addName( <span class="keyword">const</span> std::string&amp; entryId, <span class="keyword">const</span> std::string&amp; firstName, <span class="keyword">const</span> std::string&amp; lastName ) = 0;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> addName( <span class="keyword">const</span> std::string&amp; entryId, <span class="keyword">const</span> std::string&amp; firstName, <span class="keyword">const</span> std::string&amp; lastName, <span class="keyword">const</span> std::string&amp; nickname ) = 0;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> addPhone( <span class="keyword">const</span> std::string&amp; entryId, <span class="keyword">const</span> std::string&amp; label, <span class="keyword">const</span> std::string&amp; number ) = 0;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> addPostalAddress( <span class="keyword">const</span> std::string&amp; entryId,</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;            <span class="keyword">const</span> std::string&amp; label,</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;            <span class="keyword">const</span> std::string&amp; addressLine1,</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;            <span class="keyword">const</span> std::string&amp; addressLine2,</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;            <span class="keyword">const</span> std::string&amp; addressLine3,</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;            <span class="keyword">const</span> std::string&amp; city,</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;            <span class="keyword">const</span> std::string&amp; stateOrRegion,</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;            <span class="keyword">const</span> std::string&amp; districtOrCounty,</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;            <span class="keyword">const</span> std::string&amp; postalCode,</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;            <span class="keyword">const</span> std::string&amp; country,</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;            <span class="keywordtype">float</span> latitudeInDegrees,</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;            <span class="keywordtype">float</span> longitudeInDegrees,</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;            <span class="keywordtype">float</span> accuracyInMeters ) = 0;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    };</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <span class="keywordtype">bool</span> addAddressBook( <span class="keyword">const</span> std::string&amp; addressBookSourceId, <span class="keyword">const</span> std::string&amp; name, AddressBookType type );</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <span class="keywordtype">bool</span> removeAddressBook( <span class="keyword">const</span> std::string&amp; addressBookSourceId );</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> getEntries( <span class="keyword">const</span> std::string&amp; addressBookSourceId, std::weak_ptr&lt;IAddressBookEntriesFactory&gt; factory ) = 0;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <span class="keywordtype">void</span> setEngineInterface( std::shared_ptr&lt;aace::addressBook::AddressBookEngineInterface&gt; engineInterface );</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    std::shared_ptr&lt;aace::addressBook::AddressBookEngineInterface&gt; m_engineInterface;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;};</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;<span class="keyword">inline</span> std::ostream&amp; operator&lt;&lt;( std::ostream&amp; stream, <span class="keyword">const</span> AddressBook::AddressBookType&amp; type ) {</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    <span class="keywordflow">switch</span>( type ) {</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;        <span class="keywordflow">case</span> AddressBook::AddressBookType::CONTACT:</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;            stream &lt;&lt; <span class="stringliteral">&quot;CONTACT&quot;</span>;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;            <span class="keywordflow">break</span>;</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;        <span class="keywordflow">case</span> AddressBook::AddressBookType::NAVIGATION:</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;            stream &lt;&lt; <span class="stringliteral">&quot;NAVIGATION&quot;</span>;</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;            <span class="keywordflow">break</span>;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    }</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <span class="keywordflow">return</span> stream;</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;}</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;} <span class="comment">// aace::addressBook</span></div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;} <span class="comment">// aace</span></div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;<span class="preprocessor">#endif // AACE_ADDRESS_BOOK_ADDRESS_BOOK_H</span></div><div class="ttc" id="classaace_1_1core_1_1_platform_interface_html"><div class="ttname"><a href="classaace_1_1core_1_1_platform_interface.html">aace::core::PlatformInterface</a></div><div class="ttdef"><b>Definition:</b> PlatformInterface.h:29</div></div>
<div class="ttc" id="classaace_1_1address_book_1_1_address_book_1_1_i_address_book_entries_factory_html"><div class="ttname"><a href="classaace_1_1address_book_1_1_address_book_1_1_i_address_book_entries_factory.html">aace::addressBook::AddressBook::IAddressBookEntriesFactory</a></div><div class="ttdef"><b>Definition:</b> AddressBook.h:47</div></div>
<div class="ttc" id="namespaceaace_html"><div class="ttname"><a href="namespaceaace.html">aace</a></div><div class="ttdef"><b>Definition:</b> AddressBook.h:26</div></div>
</div><!-- fragment --></div><!-- contents -->
<html>
  <body>
    <hr style="height:1px;border-width:0;color:gray;background-color:gray">
    <p style="text-align:left;">
      Alexa Auto SDK 2.2.0 - Copyright 2017-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
      <span style="float:right;">
        Licensed under the <a HREF=http://aws.amazon.com/apache2.0/>Apache License, Version 2.0</a>
      </span>
    </p>
  </body>
</html>
